package com.docker.core.mvc.dao;

import com.docker.core.constant.MainConstant;
import com.jfinal.kit.Okv;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;

import java.util.List;

public abstract class BaseDao extends BaseModelDao {

    @Override
    protected String getDbName() {
        return MainConstant.DB_DOCKER;
    }

    @Override
    protected abstract String getSqlTplNameSpace();

    public Page<Record> paginate(Okv cond, int pageNum, int pageSize) {
        return tplSPPaginate("list", cond, pageNum, pageSize);
    }

    public List<Record> list(Okv cond) {
        return tplSPList("list", cond);
    }

}
